<?php slot('studyGroupsNav', 'active')?>
<div class="courses" id="wrapper">
	<?php include_partial('global/systemMessages', array('form' => $form))?>
	<div id="content">
		<div id="main">
			<div class="main-heading">
				<h1><?php echo $group->getName() ?></h1>
			</div>
			<?php include_partial('groups/subnav', array('group_id' => $group->getId(), 'current' => 'Tasks')) ?>

			<div class="tasks-heading">
				<a href="javascript:void(0);" style="color: #000; text-decoration: none;"><?php echo ($form->getObject()->isNew() ? 'Create a New' : 'Edit')?> Task &#xBB;</a>
				<?php echo link_to('Create a New Task List &#xBB;', 'task_lists/new?group_id='.$group->getId())?>
				<h2><?php echo $form->getObject()->isNew() ? 'Create a' : 'Edit'?> Task</h2>
			</div>
						
			<div id="newtaskbox" class="gray-box">
				<form action="<?php echo url_for('tasks/'.($form->getObject()->isNew() ? 'create' : 'update').(!$form->getObject()->isNew() ? '?id='.$form->getObject()->getId() : '')) ?>" method="POST" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
					<label>Choose a Task List:</label>
					<?php echo $form['task_list_id']->render() ?>
					<span id="lecture_number">
						<div class="hrule">
							<hr/>
						</div>
						<label>Assign a Lecture Number:</label>
						<?php echo $form['lecture_number']->render(array('class' => 'input-text', 'style' => 'width: 30px;')) ?>
					</span>
					<div class="hrule">
						<hr/>
					</div>
					<label>Name this Task:</label>
					<?php echo $form['name']->render(array('class' => 'input-text'))?>
					<div class="hrule">
						<hr/>
					</div>
					<label>Description (Optional):</label><br/>
					<?php echo $form['description']->render() ?>
					<div class="hrule">
						<hr/>
					</div>
					<label>URL :</label>
					<?php echo $form['url']->render(array('class' => 'input-text'))?>
					<div class="hrule">
						<hr/>
					</div>
					<label>URL Title:</label>
					<?php echo $form['url_title']->render(array('class' => 'input-text'))?>
					<div class="hrule">
						<hr/>
					</div>
					<label>Due Date:</label>
					<?php echo $form['due_date']->render() ?>
					<div class="hrule">
						<hr/>
					</div>
					<label class="floated">Optionally assign this task to:</label>
					<div class="assignments">
						<p class="add-person">
							<?php echo $form['user_id']->render() ?>
						</p>
					</div>
					<div class="hrule white">
						<hr/>
					</div>
					<ul class="options">
						<li>
							<input type="submit" value="Save Task"/>
						</li>
						<li>
							<a href="javascript:void(0);">Cancel</a>
						</li>
					</ul>
					<?php echo $form->renderHiddenFields() ?>
					<input type="hidden" name="group_id" value="<?php echo $group->getId() ?>" />
				</form>
			</div>
		</div>
		<div id="sidebar">
			<?php include_component('group_members', 'list', array('group_id' => $group->getId())) ?>	
		</div>
	</div>

</div>
				